<!DOCTYPE>
<html lang="zh-cn">
	<head>
  		<meta charset="utf-8">
      	<meta http-equiv="X-UA-Compatible" content="IE=edge">
      	<link rel="shortcut icon" href="favicon.ico"/>
      	<title>{$shops['shopName']} - {$CONF['mallTitle']}</title>
      	<meta name="keywords" content="{$shops['shopKeywords']},首页" />
      	<meta name="description" content="{$CONF['mallDesc']},{$shops['shopDesc']}" />
      	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/common.css" />
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/shophome.css" />
     	<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/base.css" />
		<link rel="stylesheet" href="__ROOT__/Apps/Home/View/{$WST_STYLE}/css/head.css" />
		<link href="__PUBLIC__/plugins/slide/css/slide.css" type="text/css" media="all" rel="stylesheet" />
		<style>
		#wst-shophome-slide { width: 100%; height: 320px; margin: 0 auto;}
		#wst-shophome-slide ul.ck-slide-wrapper { height: 320px;}
		</style>
   	</head>
   	<body>
   		<input type="hidden" id="msort" value="{$msort}"/>
   		<input type="hidden" id="mdesc" value="{$mdesc}"/>   		
   		<input type="hidden" id="shopId" value="{$shopId}"/>
   		<input type="hidden" id="ct1" value="{$ct1}"/>
   		<input type="hidden" id="ct2" value="{$ct2}"/>
		<include file="./Apps/Home/View/default/header_common.html" />
		<div>
			<if condition="$shops['shopBanner'] neq ''">
				<div style="z-index: 1;height:120px; background: url(__ROOT__/{$shops['shopBanner']}) 50% 0% / cover no-repeat scroll;" ></div>
			</if>
			<?php if(count($coupons)>0){ ?>
			<div class="wst-container" style="margin-top:0;">
				<div style="width: 300px;float:left;"><img class='lazyImg' data-original="__ROOT__/Apps/Home/View/{$WST_STYLE}/images/coupon.png" height="120"/></div>
				<div style="width: 900px;float:right;">
					<volist name="coupons" id="vo">
					<div class="wst-coupon-box">
						<div class="split"></div>
						<div class="money">
							<span style="position:relative;">{$vo['couponMoney']}
								<span class="tip">￥</span>
							</span>
						</div>
						<div class="link"><a href="javascript:receiveCoupon({$vo['couponId']});">领取&gt;</a></div>
						<div class="des"><span>满{$vo['spendMoney']}元使用</span></div>
					</div>
					</volist>
					<div class="wst-clear"></div>
				</div>
				<div class="wst-clear"></div>
			</div>
			<?php } ?>
		</div>
		<div class="wst-shophome-nav">
			<div class="wst-shophome-nav-box">
				<a href="{:U('Home/Shops/toShopHome/',array('shopId'=>$shopId,'ct1'=>-1))}"><li <if condition="$ct1 eq -1">class="liselected"</if>>本店所有商品</li></a>
				<a href="{:U('Home/Shops/toShopHome/',array('shopId'=>$shopId,'ct1'=>0))}"><li <if condition="$ct1 eq 0">class="liselected"</if>>店铺首页</li></a>
				<volist name="shopscates" key="k" id="vo" offset="0" length='7'>
				<a href="{:U('Home/Shops/toShopHome/',array('shopId'=>$vo['shopId'],'ct1'=>$vo['catId']))}"><li <if condition="$ct1 eq $vo['catId']">class="liselected"</if>>{$vo["catName"]}</li></a>
				</volist>
			</div>
		</div>
		<if condition="count($shops['shopAds']) gt 0">
		<div class="wst-slide" id="wst-slide">
			<div id="wst-shophome-slide" class="slideBox">
	
			  <ul class="items">
				<volist name="shops['shopAds']" id="vo" key='i'>
					<li style="z-index: 1;  background: url(__ROOT__/{$vo.adImg}) 50% 0% / cover no-repeat scroll;" onclick="addAccess({$vo['adId']});goBack(this)" data="{$vo['adURL']}">
					<a target="javascript:;"></a>
					</li>
				</volist>
			  </ul>
			</div>
		</div>
		
		</if>
		<!----加载商品楼层start----->
		<div class="wst-container">
			<div class="wst-shop-container">
				<div class="shop-left">
					<div class="shop-left-box">
						<table class="details-tab">
							<tbody>
								<tr>
									<td class="title">店铺名称：</td>
									<td>{$shops['shopName']}</td>
								</tr>
								<tr>
									<td class="title">营业时间：</td>
									<td>{$shops['serviceStartTime']}-{$shops['serviceEndTime']}</td>
								</tr>
								<tr>
									<td class="title">配送说明：</td>
									<td style="line-height:30px;padding-bottom:10px;">{$shops['deliveryStartMoney']}元起，配送费{$shops['deliveryMoney']}元，{$shops['deliveryFreeMoney']}元起免配送费<br/></td>
								</tr>
								<tr>
									<td class="title">店铺地址：</td>
									<td>{$shops['shopAddress']}</td>
								</tr>
								<tr>
									<td class="title">店铺电话：</td>
									<td>{$shops['shopTel']}</td>
								</tr>
								<if condition="$shops['qqNo'] neq ''">
								<tr height="35">
									<td class="title">QQ咨询：</td>
									<td >
										<a href="tencent://message/?uin={$shops['qqNo']}&Site=QQ交谈&Menu=yes">
											<img border="0" src="http://wpa.qq.com/pa?p=1:{$shops['qqNo']}:7" alt="QQ交谈" width="71" height="24" />
										</a>
									</td>
								</tr>
								</if>
								
								<tr>
									<td colspan="2" class="wst-shop-eval">
										<ul class="shop-eval-box" style="width:214px;margin:0 auto;">
											<li>商品<br/>{$shopScores["goodsScore"]}</li>
											<li class="li-center">时效<br/>{$shopScores["timeScore"]}</li>
											<li>服务<br/>{$shopScores["serviceScore"]}</li>
										</ul><div class="wst-clear"></div>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<!-- JiaThis Button BEGIN -->
										<div class="jiathis_style_24x24" style="text-align: center;padding-left: 30px;margin-top: 15px;">
											<a class="jiathis_button_qzone"></a>
											<a class="jiathis_button_tsina"></a>
											<a class="jiathis_button_tqq"></a>
											<a class="jiathis_button_weixin"></a>
											<a class="jiathis_button_cqq"></a>
											<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
										</div>
										<!-- JiaThis Button END -->
									</td>
								</tr>
								<tr>
									<td colspan='2' align='center' style='padding-top:15px;'>
									<a class='wst-shop-btn' href="javascript:favoriteShops({$shops['shopId']})">
										<span id='f1_txt' f='{$favoriteShopId}'><if condition="$favoriteShopId gt 0">已关注<else/>关注店铺</if></span>
									</a>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="wst-goods-cate-box">
						<div class="cate-title">商品分类</div>
						<div class="hotsale-goods-box" >
							<volist name="shopscates" key="k" id="vo">
								<li data="pcate-{$k}" class="pcate-{$k} pcate" style=""><span id="pcate-{$k}-s" class="span2"></span>&nbsp;&nbsp;&nbsp;&nbsp;{:WSTMSubstr($vo["catName"],0,12)}</li>
								<volist name="vo['children']" key="k2" id="vo2">
									<a href="{:U('Home/Shops/toShopHome/',array('shopId'=>$vo2['shopId'],'ct1'=>$vo['catId'],'ct2'=>$vo2['catId']))}"><li class="pcate-{$k}-c ccate" ><img src="__ROOT__/Apps/Home/View/{$WST_STYLE}/images/icon_dire_more.png" width="5" height="10"/>&nbsp;{:WSTMSubstr($vo2["catName"],0,12)}</li></a>
								</volist>
							</volist>
						</div>
					</div>
					
					{:W('Goods/getHotGoods',array('shopId'=>$shops['shopId']))}
					{:W('Goods/getViewGoods')}
				</div>
				
				<div class="shop-right">
					<div class="wst-goods-search">
						<input id="goodsName" value="{$goodsName}" type="text" class='wst-goods-ipt' placeholder="商品名称"/>
						<button class="searchwst" onclick="searchwst();">&nbsp;</button>
						<button class="searchshop"  onclick="searchShopsGoods(1);">&nbsp;</button>
					</div>
					<div class="wst-goods-list">
						<div class="wst-goods-header">
							<li <if condition="$msort eq 1">class="licurr"</if> onclick="searchShopsGoods(1);">综合排序<b <if condition="$msort eq 1 AND $mdesc eq 1">class="bscurr"</if><if condition="$msort eq 1 AND $mdesc eq 0">class="bscurr_up"</if>></b></li>
							<li <if condition="$msort eq 2">class="licurr"</if> onclick="searchShopsGoods(2);">人气<b <if condition="$msort eq 2 AND $mdesc eq 1">class="bscurr"</if><if condition="$msort eq 2 AND  $mdesc eq 0">class="bscurr_up"</if>></b></li>
							<li <if condition="$msort eq 3">class="licurr"</if> onclick="searchShopsGoods(3);">销量<b <if condition="$msort eq 3 AND $mdesc eq 1">class="bscurr"</if><if condition="$msort eq 3 AND $mdesc eq 0">class="bscurr_up"</if>></b></li>
							<li <if condition="$msort eq 4">class="licurr"</if> onclick="searchShopsGoods(4);">价格<b <if condition="$msort eq 4 AND $mdesc eq 1">class="bscurr"</if><if condition="$msort eq 4 AND $mdesc eq 0">class="bscurr_up"</if>></b></li>
							<li <if condition="$msort eq 5">class="licurr"</if> onclick="searchShopsGoods(5);">好评度<b <if condition="$msort eq 5 AND $mdesc eq 1">class="bscurr"</if><if condition="$msort eq 5 AND $mdesc eq 0">class="bscurr_up"</if>></b></li>
							<li <if condition="$msort eq 6">class="licurr"</if> onclick="searchShopsGoods(6);">上架时间<b <if condition="$msort eq 6 AND $mdesc eq 1">class="bscurr"</if><if condition="$msort eq 6 AND $mdesc eq 0">class="bscurr_up"</if>></b></li>
							<div style="float:left;position: relative;">
								&nbsp;&nbsp;&nbsp;&nbsp;
								<s class="rmb1"></s>
								<s class="rmb2"></s>
								<input type="text" class='wst-price-ipt' id="sprice" value="{$sprice}"/>-
								<input type="text" class='wst-price-ipt' id="eprice" value="{$eprice}"/>
								<button style="width:50px;height:25px;" onclick="searchShopsGoods(6);">确定</button>
							</div>
							<div class="wst-clear"></div>
						</div>
						<div class="wst-goods-page">
							<volist name="shopsgoods['root']" key="k" id="vo">
							
							<li class="wst-goods-item">
								<div class="goods-img">
									<a href="{:U('Home/Goods/getGoodsDetails/',array('goodsId'=>$vo['goodsId']))}">
										<img class='lazyImg' data-original="__ROOT__/{$vo['goodsThums']}" width="180" />
									</a>
								</div>
								<div class="goods-des">
									<div class="goods-title"><a href="{:U('Home/Goods/getGoodsDetails/',array('goodsId'=>$vo['goodsId']))}">{$vo['goodsName']}</a></div>
									<div class="goods-price"><span class="span1" id='shopGoodsPrice_{$vo["goodsId"]}' dataId='{$vo["goodsAttrId"]}'>￥{$vo['shopPrice']}</span>&nbsp;&nbsp;&nbsp;&nbsp;<span class="span2">￥{$vo['marketPrice']}</span></div>
									<div class="goods-buy">
										<div class="goods-left">
											<span class='total-buy'>{$vo["totalnum"]?$vo["totalnum"]:0}</span>人已购买
										</div>
										<div class="goods-right">
										   <if condition="$vo['goodsStock'] gt 0">
										   <a href="javascript:addCart({$vo['goodsId']},0,'{$vo['goodsThums']}')" class="btnCart">
											<img src="__ROOT__/Apps/Home/View/{$WST_STYLE}/images/btn_addcart.png" width="85"/>
										   </a>
										   <else/>
										   &nbsp;&nbsp;&nbsp;&nbsp;<font color='red'>(暂无商品)</font>
										   </if>
										</div>
										<div class="wst-clear"></div>
									</div>
								</div>
							</li>
							</volist>
							<div class="wst-clear"></div>
						</div>
						<div class="wst-page" style="text-align:center;;padding-bottom:10px;">
						<div id="wst-page-items">
						</div>
					</div>
					</div>
				
				</div>
				<div class="wst-clear"></div>
			</div>
		</div>
		<!-- JiaThis Button BEGIN -->
			<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
			<script type="text/javascript">
			var jiathis_config = {
					url: "{:U('Home/Shops/toShopHome',array('shopId'=>$shops['shopId'],'shareUserId'=>base64_encode($WST_USER['userId'])),true,true)}",
					title:"{$shops['shopName']}",
					summary:"{$GLOBALS['CONFIG']['shopShareTitle']}",
					slide:{
						divid:'jiathis_main',
						pos:'left'
					}
				};
			</script>
		<!-- JiaThis Button END -->
		
		
		<include file="./Apps/Home/View/default/footer.html" />
		<include file="./Apps/Home/View/default/right_cart.html" />
   	</body>
   	
   	<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
	<script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/shophome.js"></script>
	<script src="__PUBLIC__/js/common.js"></script>
	<script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/head.js" type="text/javascript"></script>
	<script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/common.js" type="text/javascript"></script>
	<script src="__PUBLIC__/plugins/slide/js/slide.js"></script>
	<script src="__ROOT__/Apps/Home/View/{$WST_STYLE}/js/goods.js"></script>
	
	<script type="text/javascript">
	$(document).ready(function(){
		$('#wst-shophome-slide').slideBox({
			duration : 0.3,//滚动持续时间，单位：秒
			easing : 'linear',//swing,linear//滚动特效
			delay : 5,//滚动延迟时间，单位：秒
			hideClickBar : false,//不自动隐藏点选按键
			clickBarRadius : 10
		});
		
		<if condition="$shopsgoods['totalPage'] gt 1">
		laypage({
			cont: 'wst-page-items',
			pages: {$shopsgoods['totalPage']}, //总页数
			skip: true, //是否开启跳页
			skin: '#e23e3d',
			groups: 3, //连续显示分页数
			curr: {$shopsgoods['currPage']}, 
			jump: function(e, first){ //触发分页后的回调
			    if(!first){ //一定要加此判断，否则初始时会无限刷新
			        var nuewurl = WST.splitURL("p");
			        var ulist = nuewurl.split("?");
			        if(ulist.length>1){
			        	location.href = nuewurl+'&p='+e.curr;
			        }else{
			        	location.href = '?p='+e.curr;
			        }     
			    }
			}
		});
		</if>
	});
	</script>
</html> 


